home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- /*=======================================================================*/
- /*====== This file contains a set of utilities for managing memory ======*/
- /*=======================================================================*/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define NukeHandle(h) DoNukeHandle( (Handle*) &h)
- #define NukePtr(p) DoNukePtr( (Ptr*) &p)
-
- Ptr Ptr2Ptr (Ptr InData);
- /* return a copy of the pointer passed in InData */
-
- Handle Ptr2Hand (Ptr Data);
- /* create a handle containing the same data as the passed-in pointer */
-
- Ptr Hand2Ptr (Handle Data);
- /* create a ptr containing the same data as the passed-in handle */
-
- void DoNukePtr (Ptr *PtrAddr);
- /* dispose of the memory pointed to by ThePtr, and set it to NULL */
-
- void DoNukeHandle (Handle *HandleAddr);
- /* dispose of the memory pointed to by TheHandle, and set it to NULL */
-
- #ifdef __cplusplus
- }
- #endif